package com.itany.corejava.day10;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
import java.util.Set;

public class TestProperties {

    public static void main(String[] args) throws Exception {

//        Properties p=new Properties();
//
//        p.setProperty("aaa","111");
//        p.setProperty("bbb","222");



        Properties p=new Properties();

        p.load(TestProperties.class
                             .getClassLoader()
                             .getResourceAsStream("com/itany/corejava/day10/info.properties"));



        System.out.println(p.getProperty("username"));


//        System.out.println(p.getProperty("aaa"));

        Set<String> keys=p.stringPropertyNames();

        for (String key : keys) {
            System.out.println(key+"="+p.getProperty(key));
        }

    }



}
